[Unit]
Description={{ service_name }} service docker wrapper
Wants=docker.socket
After=docker.service

[Service]
LimitNOFILE=1000000
#LimitCORE=infinity
LimitSTACK=10485760
User={{ deploy_user }}
ExecStart={{ deploy_dir }}/scripts/run_{{ this_role_name }}.sh
ExecStartPre=-{{ docker_bin_dir }}/docker rm -f {{ service_name }}
ExecStop={{ docker_bin_dir }}/docker stop {{ service_name }}
Restart={{ restart }}
RestartSec=15s

[Install]
WantedBy=multi-user.target
